package cn.ynrcb.personnelfile.admin.vo;

import cn.ynrcb.personnelfile.common.validator.group.AddGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

public interface NoticeVo {
    /**
     * 通知内容
     */
    @ApiModel(value = "通知内容")
    @Data
    class InfoResp{

        /**
         * 通知标题
         */
        @ApiModelProperty(value = "通知标题", name = "title", example = "XXX通知")
        private String title;
        /**
         * 通知内容
         */
        @ApiModelProperty(value = "通知内容", name = "content", example = "XXXXXXXXXXXX")
        private String content;
        /**
         * 类型（1-系统通知,99-其他通知）
         */
        @ApiModelProperty(value = "类型（1-系统通知,99-其他通知）", name = "type", example = "1")
        private Integer type;
        /**
         * 是否已读（1-是，0-否）
         */
        @ApiModelProperty(value = "是否已读（1-是，0-否）", name = "isRead", example = "1")
        private Boolean isRead;
        /**
         * 通知接收人ID
         */
        @ApiModelProperty(value = "通知接收人ID", name = "userId", example = "1")
        private Long userId;

    }

    /**
     * 通知保存参数
     */
    @ApiModel(value = "通知保存参数")
    @Data
    class saveParam {

        @ApiModelProperty(hidden = true, example = "1")
        private Long id;

        /**
         * 通知标题
         */
        @ApiModelProperty(value = "通知标题", name = "title", required = true, example = "XXX通知")
        @NotNull(message="通知标题不能为空", groups = {AddGroup.class})
        private String title;

        /**
         * 通知内容
         */
        @ApiModelProperty(value = "通知内容", name = "content", required = true, example = "XXXXXX内容")
        @NotNull(message="通知内容不能为空", groups = {AddGroup.class})
        private String content;

        /**
         * 通知接受人
         */
        @ApiModelProperty(value = "通知接受人数组", name = "userIds", required = true, example = "[1,2,3]")
        @NotNull(message="通知接受人不能为空", groups = {AddGroup.class})
        private String userIds;

    }
}
